import service from '../request.js'

/**
 * 获取首页
 * @param {*} params 
 */
export function getPerson(params) {
  params = {
    version: 2,
    show_micro_app_banner: 1,
    ...params
  }
  
  return service.post('/member/person', params)
}

/**
 * 发送短信
 * @param {*} mobile 
 */
export function sendSms(mobile){
  return service.post('/sms/sendCode', {
    mobile,
    ip: '127.0.0.1'
  })
}

/**
 * 登录
 */
export function login(params) {
  return service.post('/member/signin', params)
}

/**
 * 获取订单各个状态数量
 * @param {*} params 
 */
export function getOrderNum(params){
  return service.post('/order/order_num', params)
}

/**
 * 获取系统未读消息数量
 * @param {*} params 
 */
export function getUnreadMsgNum(params){
  return service.post('/member/unread_announcement', params)
}
